<template>
  <div>
    <div>
      <div class="row">
        <Banner />
      </div>
      <div class="row">
        <div class="col-xs-offset-2 col-xs-3">
          <div class="list-group">
            <!-- <a class="list-group-item" href="#">About</a>
            <a class="list-group-item active" href="#">Home</a> -->
            <!-- vue 中借助 router-link 标签实现路由切换 -->
            <router-link
              class="list-group-item"
              active-class="active"
              to="/About"
              >About</router-link
            >
            <router-link
              class="list-group-item"
              active-class="active"
              to="/Home"
              >Home</router-link
            >
          </div>
        </div>
        <div class="col-xs-5">
          <div class="panel">
            <div class="panel-body">
              <!-- 指定组件的呈现位置 -->
              <router-view></router-view>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import About from "./pages/About";
import Home from "./pages/Home";
import Banner from "./components/Banner";

export default {
  name: "App",
  components: {
    // 路由组件
    About,
    Home,
    // 一般组件
    Banner,
  },
};
</script>
